<template>
  <div id="app" style="padding: 0px">
    <el-row>
      <el-col :span="4" v-if="this.$route.path !== '/signin'">
        <el-menu
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          style="height: 100vh"
          :default-active="this.$route.path"
          router
        >
          <el-menu-item index="/">
            <i class="el-icon-s-home"></i>
            <span slot="title">首页</span>
          </el-menu-item>
          <el-submenu index="/personnel">
            <template slot="title">
              <i class="el-icon-s-custom"></i>
              <span>人员清单</span>
            </template>
            <el-menu-item index="/personnelOne">人员清单1</el-menu-item>
            <el-menu-item index="/personnelTwo">人员清单2</el-menu-item>
          </el-submenu>
          <el-submenu index="/games">
            <template slot="title">
              <i class="el-icon-mouse"></i>
              <span slot="title">游戏</span>
            </template>
            <el-menu-item index="/gamesXxddzf">寻仙大道争锋</el-menu-item>
          </el-submenu>
          <el-submenu index="/chatRoom">
            <template slot="title">
              <i class="el-icon-s-comment"></i>
              <span>聊天室</span>
            </template>
            <el-menu-item index="/chatRoom1">聊天室1</el-menu-item>
            <el-menu-item index="/chatRoom2">聊天室2</el-menu-item>
          </el-submenu>
          <el-submenu index="/WLCakeShop">
            <template slot="title">
              <i class="el-icon-present"></i>
              <span>未来蛋糕店</span>
            </template>
            <el-menu-item index="/WLCakeShopMember">会员信息</el-menu-item>
            <el-menu-item index="/WLCakeShopCommodity">商品</el-menu-item>
          </el-submenu>
          <el-menu-item index="/configure">
            <i class="el-icon-setting"></i>
            <span slot="title">配置中心</span>
          </el-menu-item>
        </el-menu>
      </el-col>
      <el-col :span="this.$route.path !== '/signin' ? 20 : 24">
        <router-view
          style="height: 95vh; overflow-x: hidden; overflow-y: auto"
        >
        </router-view>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {},
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath, "打开");
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath, "关闭");
    },
  },
};
</script>

<style>
</style>